package com.dyh.quickdemo.demos.confgMap;

/*
@Author=Joey Wheeler
@Date=2021/1/31 18:31
*/

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

@Configuration
public class SwatchSftpClientConfig {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    @Bean
    @ConfigurationProperties(prefix = "swatch.sftp")
    SwatchSftpProp swatchSftpProp(){
        return new SwatchSftpProp();
    }


    public static class SftpPop{
        private String host;
        private String port;
        private Map<String,Account> accountMap;


        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }

        public String getPort() {
            return port;
        }

        public void setPort(String port) {
            this.port = port;
        }

        public Map<String, Account> getAccountMap() {
            return accountMap;
        }

        public void setAccountMap(Map<String, Account> accountMap) {
            this.accountMap = accountMap;
        }

        public static class  Account{
            private String username;
            private String password;

            public String getUsername() {
                return username;
            }

            public void setUsername(String username) {
                this.username = username;
            }

            public String getPassword() {
                return password;
            }

            public void setPassword(String password) {
                this.password = password;
            }
        }
    }



}
